package com.education.web.api.admin.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.education.web.common.core.base.BaseService;
import com.education.web.api.admin.mapper.SystemRoleMenuMapper;
import com.education.web.entity.SystemRoleMenu;
import org.springframework.stereotype.Service;

/**
 * @author zengjintao
 * @version 1.0
 * @create_at 2020/3/8 15:57
 */
@Service
public class SystemRoleMenuService extends BaseService<SystemRoleMenuMapper, SystemRoleMenu> {


    public int deleteByRoleId(Integer roleId) {
        LambdaQueryWrapper queryWrapper = Wrappers.lambdaQuery(SystemRoleMenu.class)
                .eq(SystemRoleMenu::getRoleId, roleId);
        return baseMapper.delete(queryWrapper);
    }
}
